package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum JtgjlxEnum {

    YWLX_FJ("1", "飞机"),

    YWLX_HC("2", "火车"),

    YWLX_CTQC("3", "长途汽车"),

    YWLX_GGJT("4", "公共交通"),

    YWLX_CZC("5", "出租车"),

    YWLX_QC("6", "汽车"),

    YWLX_CB("7", "船舶"),

    YWLX_QT("9", "其他");

    private final String dm;

    private final String mc;

    public static String getMc(String dm) {
        JtgjlxEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
